home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.n / menu.n < prev    next >
Text File  |  1995-07-25  |  36KB  |  660 lines

  1.  
  2.  
  3.  
  4.      mmmmeeeennnnuuuu((((nnnn))))                      TTTTkkkk (((( ))))                       mmmmeeeennnnuuuu((((nnnn))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           menu - Create and manipulate menu widgets
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           mmmmeeeennnnuuuu _p_a_t_h_N_a_m_e ?_o_p_t_i_o_n_s?
  15.  
  16.      SSSSTTTTAAAANNNNDDDDAAAARRRRDDDD OOOOPPPPTTTTIIIIOOOONNNNSSSS
  17.           aaaaccccttttiiiivvvveeeeBBBBaaaacccckkkkggggrrrroooouuuunnnndddd               bbbbaaaacccckkkkggggrrrroooouuuunnnndddd      ddddiiiissssaaaabbbblllleeeeddddFFFFoooorrrreeeeggggrrrroooouuuunnnndddd|
  18.           aaaaccccttttiiiivvvveeeeBBBBoooorrrrddddeeeerrrrWWWWiiiiddddtttthhhh              bbbboooorrrrddddeeeerrrrWWWWiiiiddddtttthhhh     ffffoooonnnntttt           |
  19.           aaaaccccttttiiiivvvveeeeFFFFoooorrrreeeeggggrrrroooouuuunnnndddd               ccccuuuurrrrssssoooorrrr          ffffoooorrrreeeeggggrrrroooouuuunnnndddd     |
  20.  
  21.           See the ``options'' manual entry for details on the standard
  22.           options.
  23.  
  24.      WWWWIIIIDDDDGGGGEEEETTTT----SSSSPPPPEEEECCCCIIIIFFFFIIIICCCC OOOOPPPPTTTTIIIIOOOONNNNSSSS
  25.           Name:           ppppoooossssttttCCCCoooommmmmmmmaaaannnndddd
  26.           Class:          CCCCoooommmmmmmmaaaannnndddd                                       |
  27.           Command-Line Switch:----ppppoooossssttttccccoooommmmmmmmaaaannnndddd                              |
  28.  
  29.                                                                              ||
  30.                If  this  option  is  specified  then it provides a Tcl  |
  31.                command to execute each time the menu is  posted.   The  |
  32.                command  is  invoked  by the ppppoooosssstttt widget command before  |
  33.                posting the menu.
  34.  
  35.           Name:           sssseeeelllleeeeccccttttoooorrrr
  36.           Class:          FFFFoooorrrreeeeggggrrrroooouuuunnnndddd
  37.           Command-Line Switch:----sssseeeelllleeeeccccttttoooorrrr
  38.  
  39.                For menu  entries  that  are  check  buttons  or  radio
  40.                buttons,  this option specifies the color to display in
  41.                the selector when the check button or radio  button  is
  42.                selected.
  43.      _________________________________________________________________
  44.  
  45.  
  46.      IIIINNNNTTTTRRRROOOODDDDUUUUCCCCTTTTIIIIOOOONNNN
  47.           The mmmmeeeennnnuuuu command creates a new top-level  window  (given  by
  48.           the  _p_a_t_h_N_a_m_e  argument)  and  makes  it into a menu widget.
  49.           Additional options, described above, may be specified on the
  50.           command  line or in the option database to configure aspects
  51.           of the menu such as its colors and font.  The  mmmmeeeennnnuuuu  command
  52.           returns  its _p_a_t_h_N_a_m_e argument.  At the time this command is
  53.           invoked, there must not exist a window named  _p_a_t_h_N_a_m_e,  but
  54.           _p_a_t_h_N_a_m_e's parent must exist.
  55.  
  56.           A menu is a widget that displays a  collection  of  one-line
  57.           entries arranged in a column.  There exist several different
  58.           types of entries, each with different  properties.   Entries
  59.           of  different  types may be combined in a single menu.  Menu
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/23/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      mmmmeeeennnnuuuu((((nnnn))))                      TTTTkkkk (((( ))))                       mmmmeeeennnnuuuu((((nnnn))))
  71.  
  72.  
  73.  
  74.           entries are not the same as entry widgets.   In  fact,  menu
  75.           entries  are  not  even distinct widgets; the entire menu is
  76.           one widget.
  77.  
  78.           Menu entries are displayed with up to three separate fields.
  79.           The  main  field is a label in the form of text or a bitmap,
  80.           which is determined by the ----llllaaaabbbbeeeellll or ----bbbbiiiittttmmmmaaaapppp option for  the
  81.           entry.   If  the   ----aaaacccccccceeeelllleeeerrrraaaattttoooorrrr  option  is specified for an
  82.           entry then a second textual field is displayed to the  right
  83.           of   the  label.   The  accelerator  typically  describes  a
  84.           keystroke sequence that may be typed in the  application  to
  85.           cause the same result as invoking the menu entry.  The third
  86.           field is a _s_e_l_e_c_t_o_r.   The  selector  is  present  only  for
  87.           check-button  or radio-button entries.  It indicates whether
  88.           the entry is selected or not, and is displayed to  the  left
  89.           of the entry's string.
  90.  
  91.           In normal use, an  entry  becomes  active  (displays  itself
  92.           differently)  whenever  the mouse pointer is over the entry.
  93.           If a mouse button is released over the entry then the  entry
  94.           is  _i_n_v_o_k_e_d.  The effect of invocation is different for each
  95.           type of entry; these effects  are  described  below  in  the
  96.           sections on individual entries.
  97.  
  98.           Entries may be  _d_i_s_a_b_l_e_d,  which  causes  their  labels  and
  99.           accelerators to be displayed with dimmer colors.  A disabled
  100.           entry cannot be activated or invoked.  Disabled entries  may
  101.           be  re-enabled,  at  which  point  it  becomes  possible  to
  102.           activate and invoke them again.
  103.  
  104.  
  105.      CCCCOOOOMMMMMMMMAAAANNNNDDDD EEEENNNNTTTTRRRRIIIIEEEESSSS
  106.           The most common kind of menu entry is a command entry, which
  107.           behaves  much like a button widget.  When a command entry is
  108.           invoked, a Tcl command is  executed.   The  Tcl  command  is
  109.           specified with the ----ccccoooommmmmmmmaaaannnndddd option.
  110.  
  111.  
  112.      SSSSEEEEPPPPAAAARRRRAAAATTTTOOOORRRR EEEENNNNTTTTRRRRIIIIEEEESSSS
  113.           A separator is an entry that is displayed  as  a  horizontal
  114.           dividing line.  A separator may not be activated or invoked,
  115.           and it has no behavior other than its display appearance.
  116.  
  117.  
  118.      CCCCHHHHEEEECCCCKKKK----BBBBUUUUTTTTTTTTOOOONNNN EEEENNNNTTTTRRRRIIIIEEEESSSS
  119.           A check-button menu entry behaves much like  a  check-button
  120.           widget.   When  it  is  invoked  it  toggles  back and forth
  121.           between the selected and deselected states.  When the  entry
  122.           is  selected,  a  particular value is stored in a particular
  123.           global variable (as determined by the ----oooonnnnvvvvaaaalllluuuueeee and ----vvvvaaaarrrriiiiaaaabbbblllleeee
  124.           options  for  the  entry);   when  the  entry  is deselected
  125.           another value (determined by the ----ooooffffffffvvvvaaaalllluuuueeee option) is stored
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 7/23/95)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      mmmmeeeennnnuuuu((((nnnn))))                      TTTTkkkk (((( ))))                       mmmmeeeennnnuuuu((((nnnn))))
  137.  
  138.  
  139.  
  140.           in  the global variable.  A selector box is displayed to the
  141.           left of the label in a check-button entry.  If the entry  is
  142.           selected  then  the  box's  center is displayed in the color
  143.           given by the sssseeeelllleeeeccccttttoooorrrr option for  the  menu;  otherwise  the
  144.           box's  center  is  displayed in the background color for the
  145.           menu.  If a ----ccccoooommmmmmmmaaaannnndddd option is specified for a  check-button
  146.           entry,  then  its  value  is evaluated as a Tcl command each
  147.           time the entry is invoked;  this happens after toggling  the
  148.           entry's selected state.
  149.  
  150.  
  151.      RRRRAAAADDDDIIIIOOOO----BBBBUUUUTTTTTTTTOOOONNNN EEEENNNNTTTTRRRRIIIIEEEESSSS
  152.           A radio-button menu entry behaves much like  a  radio-button
  153.           widget.   Radio-button  entries  are  organized in groups of
  154.           which only one entry may be selected at a time.  Whenever  a
  155.           particular  entry  becomes  selected  it stores a particular
  156.           value into a particular global variable  (as  determined  by
  157.           the  ----vvvvaaaalllluuuueeee  and  ----vvvvaaaarrrriiiiaaaabbbblllleeee  options  for  the entry).  This
  158.           action causes any  previously-selected  entry  in  the  same
  159.           group   to  deselect  itself.   Once  an  entry  has  become
  160.           selected, any change to the entry's associated variable will
  161.           cause  the  entry  to  deselect  itself.  Grouping of radio-
  162.           button entries is determined by their associated  variables:
  163.           if  two  entries have the same associated variable then they
  164.           are in the same group.  A selector diamond is  displayed  to
  165.           the  left  of  the label in each radio-button entry.  If the
  166.           entry is selected then the diamond's center is displayed  in
  167.           the  color  given  by  the  sssseeeelllleeeeccccttttoooorrrr  option  for  the menu;
  168.           otherwise  the  diamond's  center  is   displayed   in   the
  169.           background  color  for  the  menu.   If a ----ccccoooommmmmmmmaaaannnndddd option is
  170.           specified for  a  radio-button  entry,  then  its  value  is
  171.           evaluated  as  a Tcl command each time the entry is invoked;
  172.           this happens after selecting the entry.
  173.  
  174.  
  175.      CCCCAAAASSSSCCCCAAAADDDDEEEE EEEENNNNTTTTRRRRIIIIEEEESSSS
  176.           A cascade entry is one with an associated  menu  (determined
  177.           by   the   ----mmmmeeeennnnuuuu   option).    Cascade   entries  allow  the
  178.           construction  of  cascading  menus.   When  the   entry   is
  179.           activated,  the  associated menu is posted just to the right
  180.           of the entry; that menu remains  posted  until  the  higher-
  181.           level  menu  is  unposted  or  until  some  other  entry  is
  182.           activated in the higher-level  menu.   The  associated  menu
  183.           should  normally  be  a  child  of  the  menu containing the
  184.           cascade  entry,  in  order  for  menu  traversal   to   work
  185.           correctly.
  186.  
  187.           A cascade entry posts its associated menu by invoking a  Tcl
  188.           command of the form
  189.  
  190.                     _m_e_n_u ppppoooosssstttt _x _y
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 7/23/95)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      mmmmeeeennnnuuuu((((nnnn))))                      TTTTkkkk (((( ))))                       mmmmeeeennnnuuuu((((nnnn))))
  203.  
  204.  
  205.  
  206.           where _m_e_n_u is the path name of the associated menu, _x and  _y
  207.           are the root-window coordinates of the upper-right corner of
  208.           the cascade entry, and _g_r_o_u_p is the name of the menu's group
  209.           (as  determined  in  its  last  ppppoooosssstttt  widget  command).  The
  210.           lower-level menu is unposted by executing a Tcl command with
  211.           the form
  212.  
  213.                     _m_e_n_u uuuunnnnppppoooosssstttt
  214.  
  215.           where _m_e_n_u is the name of the associated menu.
  216.  
  217.           If a ----ccccoooommmmmmmmaaaannnndddd option is specified for a cascade  entry  then
  218.           it  is  evaluated  as a Tcl command each time the associated  |
  219.           menu is posted (the evaluation occurs  before  the  menu  is  |
  220.           posted).
  221.  
  222.  
  223.      WWWWIIIIDDDDGGGGEEEETTTT CCCCOOOOMMMMMMMMAAAANNNNDDDD
  224.           The mmmmeeeennnnuuuu command creates a new Tcl  command  whose  name  is
  225.           _p_a_t_h_N_a_m_e.   This  command  may  be  used  to  invoke various
  226.           operations on the widget.   It  has  the  following  general
  227.           form:
  228.  
  229.                _p_a_t_h_N_a_m_e _o_p_t_i_o_n ?_a_r_g _a_r_g ...?
  230.           _O_p_t_i_o_n and the _a_r_gs determine  the  exact  behavior  of  the
  231.           command.
  232.  
  233.           Many of the widget commands for a menu take as one  argument
  234.           an  indicator  of  which  entry  of  the menu to operate on.
  235.           These indicators are called _i_n_d_e_xes and may be specified  in
  236.           any of the following forms:
  237.  
  238.           _n_u_m_b_e_r      Specifies  the  entry   numerically,   where   0
  239.                       corresponds to the top-most entry of the menu, 1
  240.                       to the entry below it, and so on.
  241.  
  242.           aaaaccccttttiiiivvvveeee      Indicates the entry that  is  currently  active.
  243.                       If   no  entry  is  active  then  this  form  is
  244.                       equivalent  to  nnnnoooonnnneeee.   This  form  may  not  be
  245.                       abbreviated.
  246.  
  247.           llllaaaasssstttt        Indicates the bottommost entry in the menu.   If
  248.                       there  are no entries in the menu then this form
  249.                       is equivalent to nnnnoooonnnneeee.  This  form  may  not  be
  250.                       abbreviated.
  251.  
  252.           nnnnoooonnnneeee        Indicates ``no entry at  all'';   this  is  used
  253.                       most   commonly  with  the  aaaaccccttttiiiivvvvaaaatttteeee  option  to
  254.                       deactivate all the entries in the menu.  In most
  255.                       cases  the  specification of nnnnoooonnnneeee causes nothing
  256.                       to happen in the widget command.  This form  may
  257.                       not be abbreviated.
  258.  
  259.  
  260.      Page 4                                          (printed 7/23/95)
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.      mmmmeeeennnnuuuu((((nnnn))))                      TTTTkkkk (((( ))))                       mmmmeeeennnnuuuu((((nnnn))))
  268.  
  269.  
  270.  
  271.           @@@@_n_u_m_b_e_r     In  this  form,  _n_u_m_b_e_r  is  treated  as  a   y-
  272.                       coordinate  in  the  menu's  window;   the entry
  273.                       spanning  that  y-coordinate   is   used.    For
  274.                       example,  ``@@@@0000'' indicates the top-most entry in
  275.                       the window.  If _n_u_m_b_e_r is outside the  range  of
  276.                       the window then this form is equivalent to nnnnoooonnnneeee.
  277.  
  278.           _p_a_t_t_e_r_n     If the index doesn't satisfy one  of  the  above
  279.                       forms  then  this  form  is  used.   _P_a_t_t_e_r_n  is
  280.                       pattern-matched against the label of each  entry
  281.                       in the menu, in order from the top down, until a
  282.                       matching  entry  is   found.    The   rules   of
  283.                       TTTTccccllll____SSSSttttrrrriiiinnnnggggMMMMaaaattttcccchhhh are used.
  284.  
  285.           The following widget commands are possible for menu widgets:
  286.  
  287.           _p_a_t_h_N_a_m_e aaaaccccttttiiiivvvvaaaatttteeee _i_n_d_e_x
  288.                Change the state of the entry  indicated  by  _i_n_d_e_x  to
  289.                aaaaccccttttiiiivvvveeee  and  redisplay it using its active colors.  Any
  290.                previously-active entry is deactivated.   If  _i_n_d_e_x  is
  291.                specified  as  nnnnoooonnnneeee,  or  if  the  specified  entry  is
  292.                disabled, then the menu ends up with no  active  entry.
  293.                Returns an empty string.
  294.  
  295.           _p_a_t_h_N_a_m_e aaaadddddddd _t_y_p_e ?_o_p_t_i_o_n _v_a_l_u_e _o_p_t_i_o_n _v_a_l_u_e ...?
  296.                Add a new entry to the bottom of  the  menu.   The  new
  297.                entry's  type  is  given  by  _t_y_p_e  and  must be one of
  298.                ccccaaaassssccccaaaaddddeeee,   cccchhhheeeecccckkkkbbbbuuuuttttttttoooonnnn,   ccccoooommmmmmmmaaaannnndddd,   rrrraaaaddddiiiioooobbbbuuuuttttttttoooonnnn,    or
  299.                sssseeeeppppaaaarrrraaaattttoooorrrr,  or  a  unique  abbreviation  of  one of the
  300.                above.   If  additional  arguments  are  present,  they
  301.                specify any of the following options:
  302.  
  303.                ----aaaaccccttttiiiivvvveeeebbbbaaaacccckkkkggggrrrroooouuuunnnndddd _v_a_l_u_e
  304.                     Specifies a background color to use for displaying  |
  305.                     this  entry  when it is active.  If this option is  |
  306.                     specified as an empty string (the  default),  then  |
  307.                     the  aaaaccccttttiiiivvvveeeeBBBBaaaacccckkkkggggrrrroooouuuunnnndddd  option for the overall menu  |
  308.                     is  used.   This  option  is  not  available   for  |
  309.                     separator entries.
  310.  
  311.                ----aaaacccccccceeeelllleeeerrrraaaattttoooorrrr _v_a_l_u_e
  312.                     Specifies a string to display at the right side of
  313.                     the menu entry.  Normally describes an accelerator
  314.                     keystroke sequence that may be typed to invoke the
  315.                     same  function  as the menu entry.  This option is
  316.                     not available for separator entries.
  317.  
  318.                ----bbbbaaaacccckkkkggggrrrroooouuuunnnndddd _v_a_l_u_e
  319.                     Specifies a background color to use for displaying  |
  320.                     this entry when it is in the normal state (neither  |
  321.                     active nor disabled).  If this option is specified  |
  322.                     as   an  empty  string  (the  default),  then  the  |
  323.  
  324.  
  325.  
  326.      Page 5                                          (printed 7/23/95)
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.      mmmmeeeennnnuuuu((((nnnn))))                      TTTTkkkk (((( ))))                       mmmmeeeennnnuuuu((((nnnn))))
  334.  
  335.  
  336.  
  337.                     bbbbaaaacccckkkkggggrrrroooouuuunnnndddd option for the overall  menu  is  used.  |
  338.                     This   option   is  not  available  for  separator  |
  339.                     entries.
  340.  
  341.                ----bbbbiiiittttmmmmaaaapppp _v_a_l_u_e
  342.                     Specifies a bitmap to display in the menu  instead
  343.                     of  a  textual label, in any of the forms accepted
  344.                     by TTTTkkkk____GGGGeeeettttBBBBiiiittttmmmmaaaapppp.  This option overrides the ----llllaaaabbbbeeeellll
  345.                     option  but  may  be  reset  to an empty string to
  346.                     enable a textual  label  to  be  displayed.   This
  347.                     option is not available for separator entries.
  348.  
  349.                ----ccccoooommmmmmmmaaaannnndddd _v_a_l_u_e
  350.                     For command, checkbutton, and radiobutton entries,
  351.                     specifies  a  Tcl command to execute when the menu  |
  352.                     entry is invoked.  For cascade entries,  specifies  |
  353.                     a  Tcl  command  to  execute  when  the  entry  is  |
  354.                     activated  (i.e.  just  before  its   submenu   is  |
  355.                     posted).  Not available for separator entries.
  356.  
  357.                ----ffffoooonnnntttt _v_a_l_u_e
  358.                     Specifies the font to use when drawing  the  label  |
  359.                     or  accelerator  string  in  this  entry.  If this  |
  360.                     option  is  specified  as  an  empty  string  (the  |
  361.                     default) then the ffffoooonnnntttt option for the overall menu  |
  362.                     is  used.   This  option  is  not  available   for  |
  363.                     separator entries.
  364.  
  365.                ----llllaaaabbbbeeeellll _v_a_l_u_e
  366.                     Specifies a string to display  as  an  identifying
  367.                     label  in  the  menu  entry.   Not  available  for
  368.                     separator entries.
  369.  
  370.                ----mmmmeeeennnnuuuu _v_a_l_u_e
  371.                     Available only for cascade entries.  Specifies the
  372.                     path name of the menu associated with this entry.
  373.  
  374.                ----ooooffffffffvvvvaaaalllluuuueeee _v_a_l_u_e
  375.                     Available   only   for    check-button    entries.
  376.                     Specifies  the  value  to  store  in  the  entry's
  377.                     associated variable when the entry is deselected.
  378.  
  379.                ----oooonnnnvvvvaaaalllluuuueeee _v_a_l_u_e
  380.                     Available   only   for    check-button    entries.
  381.                     Specifies  the  value  to  store  in  the  entry's
  382.                     associated variable when the entry is selected.
  383.  
  384.                ----ssssttttaaaatttteeee _v_a_l_u_e
  385.                     Specifies one  of  three  states  for  the  entry:  |
  386.                     nnnnoooorrrrmmmmaaaallll,  aaaaccccttttiiiivvvveeee, or ddddiiiissssaaaabbbblllleeeedddd.  In normal state the  |
  387.                     entry is displayed using the ffffoooorrrreeeeggggrrrroooouuuunnnndddd option for  |
  388.                     the  menu and the bbbbaaaacccckkkkggggrrrroooouuuunnnndddd option from the entry  |
  389.  
  390.  
  391.  
  392.      Page 6                                          (printed 7/23/95)
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.      mmmmeeeennnnuuuu((((nnnn))))                      TTTTkkkk (((( ))))                       mmmmeeeennnnuuuu((((nnnn))))
  400.  
  401.  
  402.  
  403.                     or the menu.  The active state is  typically  used  |
  404.                     when  the  pointer  is  over the entry.  In active  |
  405.                     state   the   entry   is   displayed   using   the  |
  406.                     aaaaccccttttiiiivvvveeeeFFFFoooorrrreeeeggggrrrroooouuuunnnndddd  option  for  the menu along with  |
  407.                     the  aaaaccccttttiiiivvvveeeebbbbaaaacccckkkkggggrrrroooouuuunnnndddd  option  from   the   entry.  |
  408.                     Disabled   state   means   that   the   entry   is  |
  409.                     insensitive:   it  doesn't  activate  and  doesn't  |
  410.                     respond  to  mouse button presses or releases.  In  |
  411.                     this state the entry is displayed according to the  |
  412.                     ddddiiiissssaaaabbbblllleeeeddddFFFFoooorrrreeeeggggrrrroooouuuunnnndddd  option  for  the  menu and the  |
  413.                     bbbbaaaacccckkkkggggrrrroooouuuunnnndddd option from the entry.  This option  is  |
  414.                     not available for separator entries.                |
  415.  
  416.                ----uuuunnnnddddeeeerrrrlllliiiinnnneeee _v_a_l_u_e                                              ||
  417.                     Specifies  the  integer  index  of  a character to  |
  418.                     underline in the entry.  This option is  typically  |
  419.                     used to indicate keyboard traversal characters.  0  |
  420.                     corresponds to the first  character  of  the  text  |
  421.                     displayed  in  the entry, 1 to the next character,  |
  422.                     and so on.  If a bitmap is displayed in the  entry  |
  423.                     then  this  option is ignored.  This option is not  |
  424.                     available for separator entries.
  425.  
  426.                ----vvvvaaaalllluuuueeee _v_a_l_u_e
  427.                     Available   only   for    radio-button    entries.
  428.                     Specifies  the  value  to  store  in  the  entry's
  429.                     associated variable when the entry is selected.
  430.  
  431.                ----vvvvaaaarrrriiiiaaaabbbblllleeee _v_a_l_u_e
  432.                     Available only for check-button  and  radio-button
  433.                     entries.   Specifies the name of a global value to
  434.                     set when the entry is selected.  For  check-button
  435.                     entries the variable is also set when the entry is
  436.                     deselected.  For  radio-button  entries,  changing
  437.                     the  variable  causes the currently-selected entry
  438.                     to deselect itself.
  439.  
  440.                The aaaadddddddd widget command returns an empty string.
  441.  
  442.           _p_a_t_h_N_a_m_e ccccoooonnnnffffiiiigggguuuurrrreeee ?_o_p_t_i_o_n? ?_v_a_l_u_e _o_p_t_i_o_n _v_a_l_u_e ...?
  443.                Query  or  modify  the  configuration  options  of  the
  444.                widget.   If  no  _o_p_t_i_o_n  is  specified, returns a list
  445.                describing all of the available  options  for  _p_a_t_h_N_a_m_e
  446.                (see  TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo for information on the format of
  447.                this list).  If _o_p_t_i_o_n is specified with no _v_a_l_u_e, then
  448.                the  command  returns  a  list describing the one named
  449.                option  (this   list   will   be   identical   to   the
  450.                corresponding  sublist  of  the  value  returned  if no
  451.                _o_p_t_i_o_n is specified).   If  one  or  more  _o_p_t_i_o_n-_v_a_l_u_e
  452.                pairs  are  specified,  then  the  command modifies the
  453.                given widget option(s) to have the given value(s);   in
  454.                this  case the command returns an empty string.  _O_p_t_i_o_n
  455.  
  456.  
  457.  
  458.      Page 7                                          (printed 7/23/95)
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.      mmmmeeeennnnuuuu((((nnnn))))                      TTTTkkkk (((( ))))                       mmmmeeeennnnuuuu((((nnnn))))
  466.  
  467.  
  468.  
  469.                may have  any  of  the  values  accepted  by  the  mmmmeeeennnnuuuu
  470.                command.
  471.  
  472.           _p_a_t_h_N_a_m_e ddddeeeelllleeeetttteeee _i_n_d_e_x_1 ?_i_n_d_e_x_2?
  473.                Delete all of  the  menu  entries  between  _i_n_d_e_x_1  and  |
  474.                _i_n_d_e_x_2   inclusive.   If  _i_n_d_e_x_2  is  omitted  then  it  |
  475.                defaults to _i_n_d_e_x_1.  Returns an empty string.
  476.  
  477.           _p_a_t_h_N_a_m_e ddddiiiissssaaaabbbblllleeee _i_n_d_e_x
  478.                Change the  state  of  the  entry  given  by  _i_n_d_e_x  to  |
  479.                ddddiiiissssaaaabbbblllleeeedddd  and  redisplay  the  entry using its disabled  |
  480.                colors.  Returns an  empty  string.   This  command  is  |
  481.                obsolete and will eventually be removed; use ``_p_a_t_h_N_a_m_e  |
  482.                eeeennnnttttrrrryyyyccccoooonnnnffffiiiigggguuuurrrreeee _i_n_d_e_x -state disabled'' instead.
  483.  
  484.           _p_a_t_h_N_a_m_e eeeennnnaaaabbbblllleeee _i_n_d_e_x
  485.                Change the state of the entry given by _i_n_d_e_x to  nnnnoooorrrrmmmmaaaallll  |
  486.                and  redisplay  the  entry  using  its  normal  colors.  |
  487.                Returns an empty string.  This command is obsolete  and  |
  488.                will    eventually    be    removed;   use   ``_p_a_t_h_N_a_m_e  |
  489.                eeeennnnttttrrrryyyyccccoooonnnnffffiiiigggguuuurrrreeee _i_n_d_e_x -state normal'' instead.
  490.  
  491.           _p_a_t_h_N_a_m_e eeeennnnttttrrrryyyyccccoooonnnnffffiiiigggguuuurrrreeee _i_n_d_e_x ?_o_p_t_i_o_n_s?
  492.                This command  is  similar  to  the  ccccoooonnnnffffiiiigggguuuurrrreeee  command,
  493.                except that it applies to the options for an individual
  494.                entry, whereas ccccoooonnnnffffiiiigggguuuurrrreeee applies to the options for the
  495.                menu  as  a  whole.  _O_p_t_i_o_n_s may have any of the values
  496.                accepted by the aaaadddddddd widget  command.   If  _o_p_t_i_o_n_s  are
  497.                specified,  options  are  modified  as indicated in the
  498.                command and the command returns an empty string.  If no
  499.                _o_p_t_i_o_n_s  are  specified,  returns a list describing the
  500.                current options for entry _i_n_d_e_x  (see  TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo
  501.                for information on the format of this list).
  502.  
  503.           _p_a_t_h_N_a_m_e iiiinnnnddddeeeexxxx _i_n_d_e_x
  504.                Returns the numerical index corresponding to _i_n_d_e_x,  or
  505.                nnnnoooonnnneeee if _i_n_d_e_x was specified as nnnnoooonnnneeee.
  506.  
  507.           _p_a_t_h_N_a_m_e iiiinnnnvvvvooookkkkeeee _i_n_d_e_x
  508.                Invoke the action of the menu entry.  See the  sections
  509.                on  the  individual  entries  above for details on what
  510.                happens.  If the menu entry is  disabled  then  nothing
  511.                happens.  If the entry has a command associated with it
  512.                then the result of that  command  is  returned  as  the
  513.                result  of  the  iiiinnnnvvvvooookkkkeeee  widget command.  Otherwise the
  514.                result is an empty  string.   Note:   invoking  a  menu
  515.                entry does not automatically unpost the menu.  Normally
  516.                the associated menubutton will take care  of  unposting
  517.                the menu.
  518.  
  519.           _p_a_t_h_N_a_m_e ppppoooosssstttt _x _y
  520.                Arrange for the menu to be displayed on the  screen  at
  521.  
  522.  
  523.  
  524.      Page 8                                          (printed 7/23/95)
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.      mmmmeeeennnnuuuu((((nnnn))))                      TTTTkkkk (((( ))))                       mmmmeeeennnnuuuu((((nnnn))))
  532.  
  533.  
  534.  
  535.                the  root-window  coordinates  given by _x and _y.  These
  536.                coordinates are adjusted if necessary to guarantee that
  537.                the entire menu is visible on the screen.  This command
  538.                normally returns an empty string.  If the  ----ppppoooossssttttccccoooommmmmmmmaaaannnndddd  |
  539.                option  has  been specified, then its value is executed  |
  540.                as a Tcl script before posting the menu and the  result  |
  541.                of  that  script  is returned as the result of the ppppoooosssstttt  |
  542.                widget command.  If an error  returns  while  executing  |
  543.                the command, then the error is returned without posting  |
  544.                the menu.
  545.  
  546.           _p_a_t_h_N_a_m_e uuuunnnnppppoooosssstttt
  547.                Unmap the window so that it is no longer displayed.  If
  548.                a  lower-level  cascaded  menu  is  posted, unpost that
  549.                menu.  Returns an empty string.
  550.  
  551.           _p_a_t_h_N_a_m_e yyyyppppoooossssiiiittttiiiioooonnnn _i_n_d_e_x
  552.                Returns a decimal string giving the y-coordinate within
  553.                the  menu  window  of  the  topmost  pixel in the entry
  554.                specified by _i_n_d_e_x.
  555.  
  556.  
  557.  
  558.      DDDDEEEEFFFFAAAAUUUULLLLTTTT BBBBIIIINNNNDDDDIIIINNNNGGGGSSSS
  559.           Tk automatically creates class bindings for menus that  give  |
  560.           them the following default behavior:                          |
  561.  
  562.           [1]                                                                ||
  563.                When   the  mouse  cursor  enters  a  menu,  the  entry  |
  564.                underneath the mouse cursor is activated;  as the mouse  |
  565.                moves  around  the  menu,  the  active entry changes to  |
  566.                track the mouse.                                         |
  567.  
  568.           [2]                                                                ||
  569.                When button 1 is released over a menu, the active entry  |
  570.                (if any) is invoked.                                     |
  571.  
  572.           [3]                                                                ||
  573.                A menu can be repositioned on the screen by dragging it  |
  574.                with mouse button 2.                                     |
  575.  
  576.           [4]                                                                ||
  577.                A  number  of  other  bindings  are  created to support  |
  578.                keyboard menu traversal.   See  the  manual  entry  for  |
  579.                ttttkkkk____bbbbiiiinnnnddddFFFFoooorrrrTTTTrrrraaaavvvveeeerrrrssssaaaallll for details on these bindings.       |
  580.  
  581.           Disabled  menu  entries  are  non-responsive:   they   don't  |
  582.           activate and ignore mouse button presses and releases.        |
  583.  
  584.           The behavior  of  menus  can  be  changed  by  defining  new  |
  585.           bindings  for  individual widgets or by redefining the class  |
  586.           bindings.
  587.  
  588.  
  589.  
  590.      Page 9                                          (printed 7/23/95)
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.      mmmmeeeennnnuuuu((((nnnn))))                      TTTTkkkk (((( ))))                       mmmmeeeennnnuuuu((((nnnn))))
  598.  
  599.  
  600.  
  601.      BBBBUUUUGGGGSSSS
  602.           At present it isn't possible to use the option  database  to  |
  603.           specify values for the options to individual entries.
  604.  
  605.  
  606.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  607.           menu, widget
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.      Page 10                                         (printed 7/23/95)
  657.  
  658.  
  659.  
  660.